<template>
  <el-table :data="tableData" style="width: 120%">
        <el-table-column label="编号" width="120">
          <template #default="{ row }">{{ row.id }}</template>
        </el-table-column>
        <el-table-column label="用户名" width="120">
          <template #default="{ row }">{{ row.username }}</template>
        </el-table-column>
        <el-table-column  label="密码" width="120">
          <template #default="{ row }">{{ row.password }}</template>
        </el-table-column>
        <el-table-column   label="头像" width="120">
          <template #default="{ row }">{{ row.icon }}</template>
        </el-table-column>
        <el-table-column  label="邮箱" width="120">
          <template #default="{ row }">{{ row.email }}</template>
        </el-table-column>
        <el-table-column  label="昵称" width="120">
          <template #default="{ row }">{{ row.nickName }}</template>
        </el-table-column>
        <el-table-column  label="备注信息" width="120">
          <template #default="{ row }">{{ row.note }}</template>
        </el-table-column>
        <el-table-column  label="创建时间" width="120">
          <template #default="{ row }">{{ row.createTime }}</template>
        </el-table-column>
        <el-table-column label="最后登录时间" width="120">
          <template #default="{ row }">{{ row.loginTime }}</template>
        </el-table-column>
        <el-table-column   label="账号启用状态" width="120">
          <template #default="{ row }">{{ row.status }}</template>
        </el-table-column>
        <el-table-column  label="操作" width="120">
         
          <template #default="{ row }">
            <el-button
              size="small"
              type="text"
              @click="() => handleUpdate(row)">编辑
            </el-button>
            <el-button
              size="small"
              type="text"
              @click="() => handleDelete(row)">删除
            </el-button>
          </template>
        </el-table-column>
  </el-table>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, reactive } from 'vue';
import { getAdmin,getAdminList } from'../../../api';

import { request } from '../../../utils/request';
import { id } from 'element-plus/es/locales.mjs';
import { Key } from '@element-plus/icons-vue';
//获取列表数据

let uderForm ={
  keyword:'',
  pageNum:'',
  pageSize:''

}

// const tableData = reactive([]);
// const getList = async () => {

//     const response = await getAdminList(id.value);
//     tableData.value = response.data.list
// }

// const getList = async (row) => {
//   await getAdminList(row.userName)
//   //console.log('当前数据')
// }
// onMounted(() => {
//   // resetParentId();
//   //console.log('当前数据')
// getList().then(() =>{
//   console.log('当前数据11',getList)
// })


// });


</script>